package com.ylyq.ylxx.mapper;

import com.ylyq.ylxx.entity.YlyqRefusePlan;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xiaweichao
 * @since 2020-08-21
 */
public interface YlyqRefusePlanMapper extends BaseMapper<YlyqRefusePlan> {

    @Select("SELECT plan.advertiser_id as advertiser_id,plan.group_id as group_id,plan.plan_id_start as plan_id_start,plan.plan_id_current as plan_id_current,info.choose_url\n" +
            "FROM `ylyq_refuse_plan` plan LEFT JOIN ylyq_group_info info ON plan.group_id=info.group_id\n" +
            "WHERE plan.count=#{count} and plan.advertiser_id=#{advertiser_id}")
    List<Map<String, Object>> getRefusePlan(@Param("count") int count,@Param("advertiser_id") Long advertiser_id);
}
